|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Macros | |
| #define | High_Threshold 818 |
| #define | Low_Threshold 409 |
| #define | SlowToggle_Period 20000 - 1 |
| #define | FastToggle_Period 1000 - 1 |
Functions | |
| void | main (void) |
| void | ADC10_A_ISR (void) |
| void | TIMER0_B0_ISR (void) |
Variables | |
| Timer_B_initUpModeParam | paramB2 = {0} |
| #define FastToggle_Period 1000 - 1 |
Definition at line 78 of file adc10_a_ex3_windowComp.c.
| #define High_Threshold 818 |
ADC10_A - Sample A1 Input, Window Comparator, 2.5V Internal Ref, TB0 Trigger
MSP430F550x Demo A1 is sampled in every 0.5s using the TA0.0 trigger in single ch/conversion mode. Window comparator is used to generate interrupts to indicate when the input voltage goes above the High_Threshold or below the Low_Threshold or is in between the high and low thresholds. TIMER_B0 is used as an interval timer used to control the LED at P1.0 to toggle slow/fast or turn off according to the ADC10_A Hi/Lo/IN interupts. ADC10_A is configured in pulse sample mode and is triggered by the TA0.0
MSP430F550x
-----------------
/|\| XIN|-
| | |
--|RST XOUT|-
| P6.1/A1|<- Sample Signal
| P1.0|-> LED [toggle slow/fast or turn off]
| |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 73 of file adc10_a_ex3_windowComp.c.
| #define Low_Threshold 409 |
Definition at line 75 of file adc10_a_ex3_windowComp.c.
| #define SlowToggle_Period 20000 - 1 |
Definition at line 77 of file adc10_a_ex3_windowComp.c.
| void ADC10_A_ISR | ( | void | ) |
Definition at line 222 of file adc10_a_ex3_windowComp.c.
References FastToggle_Period, GPIO_setOutputLowOnPin(), paramB2, and SlowToggle_Period.
| void main | ( | void | ) |
Definition at line 82 of file adc10_a_ex3_windowComp.c.
References __delay_cycles(), __no_operation(), FastToggle_Period, GPIO_setOutputLowOnPin(), High_Threshold, Low_Threshold, and paramB2.
| void TIMER0_B0_ISR | ( | void | ) |
Definition at line 270 of file adc10_a_ex3_windowComp.c.
| Timer_B_initUpModeParam paramB2 = {0} |
Definition at line 80 of file adc10_a_ex3_windowComp.c.
Referenced by ADC10_A_ISR(), and main().